VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "clsFileList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'*---------------------------------------------------------------
'*
'* ClassName:      clsFileList
'* FileName:       FILELIST.BAS
'* Date:           July 1998
'* Author:         Ian M. Weatherburn
'* Company:        Mindkey Software Solutions (Pty) Ltd.
'* Copyright:      Copyright (C) 1998 by Mindkey Software Solutions
'*                 All Rights Reserved
'* Description:    Maintain Collection of Files to be Uploaded
'*---------------------------------------------------------------

Option Explicit

Private collFileList As Collection

Public Property Get Count() As Long
  Count = collFileList.Count
End Property

Public Property Get Item(intIndex As Integer) As String
  Item = collFileList.Item(intIndex).FileName
End Property

Public Property Get Length(intIndex As Integer) As Long
  Length = collFileList.Item(intIndex).FileLength
End Property

Public Function AddEntry(strFileInfo As String)
 
  Dim FileInfo As New clsFileInfo
  
  FileInfo.FileName = strFileInfo
  FileInfo.FileLength = FileLen(strFileInfo)
 
  ' Add the filename to the collection
  collFileList.Add FileInfo
  
End Function

Public Sub Clear()
  Dim FileItem As Collection
  
  ' Remove all the filename from the collection
  For Each FileItem In collFileList
    collFileList.Remove 1
  Next
  
End Sub

Private Sub Class_initialize()

  ' Initialise collection of files
  Set collFileList = New Collection
  
End Sub

Private Sub Class_Terminate()

  ' Release collection
  Set collFileList = Nothing
End Sub

